<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="pgFreespacemapRelations" styleClass="edit">

        <rich:panel>
            <f:facet name="header">#{pgFreespacemapRelationsHome.managed ? 'Edit' : 'Add'} Pg freespacemap relations</f:facet>


            <s:decorate id="avgrequestField" template="layout/edit.xhtml">
                <ui:define name="label">Avgrequest</ui:define>
                <h:inputText id="avgrequest"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.avgrequest}">
                    <a:support event="onblur" reRender="avgrequestField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <s:decorate id="interestingpagesField" template="layout/edit.xhtml">
                <ui:define name="label">Interestingpages</ui:define>
                <h:inputText id="interestingpages"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.interestingpages}">
                    <a:support event="onblur" reRender="interestingpagesField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <s:decorate id="nextpageField" template="layout/edit.xhtml">
                <ui:define name="label">Nextpage</ui:define>
                <h:inputText id="nextpage"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.nextpage}">
                    <a:support event="onblur" reRender="nextpageField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <s:decorate id="reldatabaseField" template="layout/edit.xhtml">
                <ui:define name="label">Reldatabase</ui:define>
                <h:inputText id="reldatabase"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.reldatabase}">
                    <a:support event="onblur" reRender="reldatabaseField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <s:decorate id="relfilenodeField" template="layout/edit.xhtml">
                <ui:define name="label">Relfilenode</ui:define>
                <h:inputText id="relfilenode"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.relfilenode}">
                    <a:support event="onblur" reRender="relfilenodeField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <s:decorate id="reltablespaceField" template="layout/edit.xhtml">
                <ui:define name="label">Reltablespace</ui:define>
                <h:inputText id="reltablespace"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.reltablespace}">
                    <a:support event="onblur" reRender="reltablespaceField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <s:decorate id="storedpagesField" template="layout/edit.xhtml">
                <ui:define name="label">Storedpages</ui:define>
                <h:inputText id="storedpages"
                       required="true"
                       disabled="#{pgFreespacemapRelationsHome.managed}"
                          value="#{pgFreespacemapRelationsHome.instance.id.storedpages}">
                    <a:support event="onblur" reRender="storedpagesField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>

            <div style="clear:both">
                <span class="required">*</span>
                required fields
            </div>

        </rich:panel>

        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{pgFreespacemapRelationsHome.persist}"
                       disabled="#{!pgFreespacemapRelationsHome.wired}"
                       rendered="#{!pgFreespacemapRelationsHome.managed}"/>

            <h:commandButton id="update"
                          value="Save"
                         action="#{pgFreespacemapRelationsHome.update}"
                       rendered="#{pgFreespacemapRelationsHome.managed}"/>

            <h:commandButton id="delete"
                          value="Delete"
                         action="#{pgFreespacemapRelationsHome.remove}"
                      immediate="true"
                       rendered="#{pgFreespacemapRelationsHome.managed}"/>

            <s:button id="cancelEdit"
                   value="Cancel"
             propagation="end"
                    view="/PgFreespacemapRelations.xhtml"
                rendered="#{pgFreespacemapRelationsHome.managed}"/>

            <s:button id="cancelAdd"
                   value="Cancel"
             propagation="end"
                    view="/#{empty pgFreespacemapRelationsFrom ? 'PgFreespacemapRelationsList' : pgFreespacemapRelationsFrom}.xhtml"
                rendered="#{!pgFreespacemapRelationsHome.managed}"/>

        </div>
    </h:form>

</ui:define>

</ui:composition>
